package es

import (
	"gozero-demo/internal/config"
)

// ESConfig 定义 Elasticsearch 的配置结构体
type ESConfig struct {
	Hosts    []string
	Username string
	Password string
}

// LoadESConfig 加载 Elasticsearch 配置
func LoadESConfig(c config.Config) ESConfig {
	return ESConfig{
		Hosts:    c.Elasticsearch.Hosts,
		Username: c.Elasticsearch.Username,
		Password: c.Elasticsearch.Password,
	}
}
